第 5 步:我们现在有了密码!让我们从一个接收用户输入的函数开始。
- 这个函数需要一个参数——问问题的精灵。然后它将返回用户的输入。
- 在,在上面写着: MAIN FUNCTION的地方拖入Define Function with Docstring 。
- 将my_function重命名为get_user_input并在( )中键入text_sprite 。
- 最后,将您的文档字符串更改为以下内容: """ Asks user for input and displays result """
To navigate the page using the TAB key, first press ESC to exit the code editor.